/*
 * Copyright (c) 2025 Li Auto Inc. and its affiliates
 * Licensed under the Apache License, Version 2.0(the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/**
 * Eth Driver Configuration File
 */
#include "Eth_GEthMac_Cfg.h"

/* pin configuration RTL8211F */
const IfxGeth_Eth_RgmiiPins gethmac_pins = {
	.txClk 		= 	&ETH_TXCLK_PIN, 	/* TXCLK */
	.txd0 		= 	&ETH_TXD0_PIN, 		/* TXD0 */
	.txd1 		= 	&ETH_TXD1_PIN, 		/* TXD1 */
	.txd2 		= 	&ETH_TXD2_PIN, 		/* TXD2 */
	.txd3 		= 	&ETH_TXD3_PIN, 		/* TXD3 */
	.txCtl 		= 	&ETH_TXCTL_PIN, 	/* TXCTL */
	.rxClk 		= 	&ETH_RXCLK_PIN, 	/* RXCLK */
	.rxd0 		= 	&ETH_RXD0_PIN, 		/* RXD0 */
	.rxd1 		= 	&ETH_RXD1_PIN, 		/* RXD1 */
	.rxd2 		= 	&ETH_RXD2_PIN, 		/* RXD2 */
	.rxd3 		= 	&ETH_RXD3_PIN, 		/* RXD3 */
	.rxCtl 		= 	&ETH_RXCTL_PIN, 	/* RXCTL */
	.mdc 		= 	&ETH_MDC_PIN, 		/* MDC */
	.mdio 		= 	&ETH_MDIO_PIN, 		/* MDIO */
	.grefClk	= 	&ETH_GREFCLK_PIN 	/* GREFCLK */
};

volatile eth_tx_buffer_crtl_type channel0_tx_buffer_crtl[IFXGETH_MAX_TX_DESCRIPTORS];
uint8 channel0_tx_buffer[IFXGETH_MAX_TX_DESCRIPTORS][IFXGETH_MAX_TX_BUFFER_SIZE];
uint8 channel0_rx_buffer[IFXGETH_MAX_RX_DESCRIPTORS][IFXGETH_MAX_RX_BUFFER_SIZE];

/* phy init function pointer */
geth_eth_phy_init phy_init_func_ptr = (geth_eth_phy_init)IfxGeth_Eth_Phy_Rtl8211f_init;